//app.js
var CONSTANT = require('./common/constant');
const util = require('utils/util');
App({
  onLaunch: function() {
    let that = this
    if (wx.getStorageSync("userInfo")) {
      let userInfo = wx.getStorageSync("userInfo")
      that.globalData.userInfo = userInfo
      console.log(userInfo)
      return;
    }
    else {
      wx.redirectTo({
        url:'pages/login/login'
      })
    }
  },
  titleToast: function(toastTitle) {
    wx.showToast({
      title: toastTitle,
      icon: "none",
      duration: 1500
    })
  },

 
  globalData: {
    userInfo: {
     
    },
    isFirst: true,
    teaType: 0
  }
})